/**
 * Created by HIAPAD on 2017/12/26.
 */
var Code=require("../utils/code");

exports.upload=function(req,res){
    console.log(req.file);
    res.header("Access-Control-Allow-Origin", "*");
    if(!req.file){
    	res.send({code:Code.paramsMissingCode,error:"上传错误"});
    }else{
    	res.send({code:Code.successCode,data:req.file.filename});
    }
}